package com.homedo.async.mysql.support.dao;

import lombok.Getter;

/**
 * @author jgshun
 * @date 2020/1/19 4:35 PM
 */
@Getter
public enum JavaTypeMappingEnum {

    BOOL(Byte.class),
    BOOLEAN(Byte.class),
    TINYINT(Byte.class),
    SMALLINT(Short.class),
    MEDIUMINT(Integer.class),
    INT(Integer.class),
    INTEGER(Integer.class),
    BIGINT(Long.class),
    FLOAT(Float.class),
    DOUBLE(Double.class),
    NUMERIC(io.vertx.sqlclient.data.Numeric.class),
    DATE(java.time.LocalDate.class),
    DATETIME(java.time.LocalDateTime.class),
    TIME(java.time.Duration.class),
    TIMESTAMP(java.time.LocalDateTime.class),
    YEAR(Short.class),
    CHAR(String.class),

    VARCHAR(String.class),
    BINARY(io.vertx.core.buffer.Buffer.class),
    VARBINARY(io.vertx.core.buffer.Buffer.class),
    TINYBLOB(io.vertx.core.buffer.Buffer.class),
    TINYTEXT(String.class),
    BLOB(io.vertx.core.buffer.Buffer.class),
    TEXT(String.class),
    MEDIUMBLOB(io.vertx.core.buffer.Buffer.class),

    MEDIUMTEXT(String.class),
    LONGBLOB(io.vertx.core.buffer.Buffer.class),
    LONGTEXT(String.class),
    ENUM(String.class),
    SET(String.class),
    JSON(io.vertx.core.json.JsonObject.class),
    JSONArr(io.vertx.core.json.JsonArray.class),;

    private Class javaClass;

    private JavaTypeMappingEnum(Class javaClass) {
        this.javaClass = javaClass;
    }
    
}
